package com.hospital.workstation.mapper;

import com.hospital.common.core.domain.R;
import com.hospital.workstation.domain.HisMedicalOrders;
import com.hospital.workstation.domain.vo.HisMedicalOrdersVo;
import com.hospital.common.core.mapper.BaseMapperPlus;
import com.hospital.workstation.domain.vo.MedicalDetailVo;
import com.hospital.workstation.domain.vo.MedicalRecordVo;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 医嘱Mapper接口
 *
 * @author whb
 * @date 2023-03-10
 */
public interface HisMedicalOrdersMapper extends BaseMapperPlus<HisMedicalOrdersMapper, HisMedicalOrders, HisMedicalOrdersVo> {

    List<MedicalRecordVo> selectListByMedicalRecordNo(@Param("medicalRecordNo") Integer medicalRecordNo);

    /**
     * 查询医嘱用药药物名称列表
     *
     * @param medicalRecordNo 病历号
     * @return
     */
    List<String> selectOrderItemDescList(@Param("medicalRecordNo") Integer medicalRecordNo, @Param("orderCategory") String orderCategory);

    /**
     * 查询医嘱用药药物名称列表
     *
     * @param medicalRecordNo 病历号
     * @param orderCategory   医嘱类别
     * @return
     */
    List<HisMedicalOrdersVo> selectOrderItemDescList2(@Param("medicalRecordNo") Integer medicalRecordNo, @Param("orderCategory") String orderCategory);

    /**
     * 分组查询医嘱用药列表
     *
     * @param medicalRecordNo 病历号
     * @param condition       字段
     * @param category        类别
     * @return
     */
    List<MedicalRecordVo> selectOrdersListToGroup(@Param("medicalRecordNo") Integer medicalRecordNo, @Param("condition") String condition, @Param("category") String category);

    /**
     * 分组查询医嘱用药列表
     *
     * @param medicalRecordNo 病历号
     * @param condition       字段
     * @param categoryList    类别集合
     * @return
     */
    List<MedicalRecordVo> selectOrdersListToGroup2(@Param("medicalRecordNo") Integer medicalRecordNo, @Param("condition") String condition, @Param("categoryList") List<String> categoryList, @Param("isHaveTraditional") boolean isHaveTraditional);
}
